// 模拟数据文件

// 设置为false以使用真实API，设置为true以使用模拟数据
const USE_MOCK = false;

// 热门文章数据
export const mockHotArticles = [
  {
    createTime: "2022-01-12 21:16:07",
    id: "4",
    thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9d435c4e.webp",
    title: "测试 Kila Kila Blog 的博客样式",
    viewCount: "72"
  },
  {
    createTime: "2022-02-12 22:32:45",
    id: "3",
    thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887aa3147a6a.webp",
    title: "对 python 中 @property 装饰器的一点思考",
    viewCount: "34"
  },
  {
    createTime: "2021-12-13 13:24:53",
    id: "5",
    thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9c2b9420.webp",
    title: "如何在 IDEA 中配置 Easy Code 的 MybatisPlus 实体类模板",
    viewCount: "8"
  },
  {
    createTime: "2022-03-13 23:59:15",
    id: "2",
    thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a949f335a.webp",
    title: "如何在 Vue3 中处理 img 标签图片加载错误的问题",
    viewCount: "6"
  },
  {
    createTime: "2022-03-14 00:27:57",
    id: "1",
    thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a910da32e.webp",
    title: "如何在 pyqt 中解决国际化 tr() 函数不管用的问题",
    viewCount: "5"
  },
  // 新增热门文章
  {
    createTime: "2022-04-22 16:42:18",
    id: "9",
    thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a918e4d74.webp",
    title: "Vue 3 响应式系统原理解析",
    viewCount: "215"
  },
  {
    createTime: "2022-05-10 10:30:55",
    id: "12",
    thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9e32634b.webp",
    title: "CSS Grid 与 Flexbox 布局完全指南",
    viewCount: "156"
  },
  {
    createTime: "2022-05-05 13:45:12",
    id: "11",
    thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9d841c35.webp",
    title: "JavaScript 异步编程演进史",
    viewCount: "203"
  },
  {
    createTime: "2022-05-15 15:22:40",
    id: "13",
    thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9d435c4e.webp",
    title: "React Hooks 深入浅出",
    viewCount: "189"
  },
  {
    createTime: "2022-05-20 08:18:37",
    id: "14",
    thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887aa3147a6a.webp",
    title: "Node.js 性能优化实战",
    viewCount: "142"
  }
];

// 文章列表数据
export const mockArticleList = {
  rows: [
    {
      categoryName: "markdown",
      createTime: "2022-01-12 21:16:07",
      id: "4",
      summary: "这篇博客用来测试 Kila Kila Blog 的正文样式",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a92aa6e5d.webp",
      title: "测试 Kila Kila Blog 的博客样式",
      viewCount: "72"
    },
    {
      categoryName: "python",
      createTime: "2022-03-14 00:27:57",
      id: "1",
      summary: "前言\n有些时候我们在父类中使用了 self.tr('XXX')，使用 Qt Linguist 完成翻译并导出 qm 文件后，发现子类中仍然是英文原文。比如下面这段代码：\nclass AlbumCardBase(QWidget):\n    &quot;&quot;&quot; 专辑卡基类 &quot;",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a912447cf.webp",
      title: "如何在 pyqt 中解决国际化 tr() 函数不管用的问题",
      viewCount: "5"
    },
    // 新增的10篇文章数据
    {
      categoryName: "前端",
      createTime: "2022-04-15 14:30:22",
      id: "7",
      summary: "Vue 3 Composition API 是 Vue 3 中引入的一种新的组织和重用组件逻辑的方式。它提供了一种更灵活的方式来编写组件代码。",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9134fd76.webp",
      title: "深入理解 Vue 3 Composition API",
      viewCount: "128"
    },
    {
      categoryName: "python",
      createTime: "2022-04-18 09:15:45",
      id: "8",
      summary: "Python 装饰器是 Python 中强大而灵活的特性之一。它们允许我们在不修改原函数代码的情况下，为函数添加新的功能。",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a94412622.webp",
      title: "Python 装饰器完全指南",
      viewCount: "96"
    },
    {
      categoryName: "vue",
      createTime: "2022-04-22 16:42:18",
      id: "9",
      summary: "Vue 3 的响应式系统是其核心特性之一。本文将深入探讨 Vue 3 是如何通过 Proxy 实现响应式的。",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a918e4d74.webp",
      title: "Vue 3 响应式系统原理解析",
      viewCount: "215"
    },
    {
      categoryName: "前端",
      createTime: "2022-05-01 11:20:33",
      id: "10",
      summary: "现代前端开发中，Webpack 是最常用的模块打包工具之一。了解其工作原理对于优化项目构建非常重要。",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9cb173a8.webp",
      title: "Webpack 5 核心原理与优化策略",
      viewCount: "176"
    },
    {
      categoryName: "javascript",
      createTime: "2022-05-05 13:45:12",
      id: "11",
      summary: "JavaScript 异步编程是现代 Web 开发中的重要概念。从回调函数到 Promise，再到 async/await，异步编程方式不断演进。",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9d841c35.webp",
      title: "JavaScript 异步编程演进史",
      viewCount: "203"
    },
    {
      categoryName: "css",
      createTime: "2022-05-10 10:30:55",
      id: "12",
      summary: "CSS Grid 和 Flexbox 是现代 CSS 布局的两大利器。它们各有特点，适用于不同的布局场景。",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9e32634b.webp",
      title: "CSS Grid 与 Flexbox 布局完全指南",
      viewCount: "156"
    },
    {
      categoryName: "react",
      createTime: "2022-05-15 15:22:40",
      id: "13",
      summary: "React Hooks 是 React 16.8 引入的新特性，它让函数组件也能拥有状态和其他 React 特性。",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9d435c4e.webp",
      title: "React Hooks 深入浅出",
      viewCount: "189"
    },
    {
      categoryName: "nodejs",
      createTime: "2022-05-20 08:18:37",
      id: "14",
      summary: "Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境。它使得 JavaScript 可以用于服务器端编程。",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887aa3147a6a.webp",
      title: "Node.js 性能优化实战",
      viewCount: "142"
    },
    {
      categoryName: "数据库",
      createTime: "2022-05-25 17:55:21",
      id: "15",
      summary: "MongoDB 是一个基于分布式文件存储的开源数据库系统。它属于 NoSQL 数据库的一种，具有高性能、易部署等特点。",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9c2b9420.webp",
      title: "MongoDB 高级查询与索引优化",
      viewCount: "98"
    },
    {
      categoryName: "docker",
      createTime: "2022-05-30 12:40:16",
      id: "16",
      summary: "Docker 是一个开源的应用容器引擎，让开发者可以打包他们的应用以及依赖包到一个可移植的容器中。",
      thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a949f335a.webp",
      title: "Docker 容器化部署最佳实践",
      viewCount: "167"
    }
  ],
  total: "16"
};

// 文章详情数据
export const mockArticleDetails = {
  categoryId: "2",
  categoryName: "python",
  content: "# 前言\n\n有些时候我们在父类中使用了 `self.tr('XXX')`，使用 Qt Linguist 完成翻译并导出 qm 文件后，发现子类中仍然是英文原文。比如下面这段代码：\n\n```python\nclass AlbumCardBase(QWidget):\n    \"\"\" 专辑卡基类 \"\"\"\n\n    def __init__(self, parent=None):\n        super().__init__(parent=parent)\n        self.playButton = BlurButton(\n            self,\n            (30, 65),\n            \":/images/album_tab_interface/Play.png\",\n            self.coverPath,\n            self.tr('Play')\n        )\n        self.addToButton = BlurButton(\n            self,\n            (100, 65),\n            \":/images/album_tab_interface/Add.png\",\n            self.coverPath,\n            self.tr('Add to')\n        )\n```\n\n父类 `AlbumCardBase` 中有两处使用了 `tr` 函数，分别翻译为 `播放` 和 `添加到`，但是在子类中这些文本仍然会显示为 `Play` 和 `Add to`，下面来看看如何解决这个问题。\n\n# 解决过程\n\n生成的 ts 文件中，有这样一段代码：\n\n```xml\n<context>\n    <name>AlbumCardBase</name>\n    <message>\n        <location filename=\"../../components/album_card/album_card_base.py\" line=\"50\"/>\n        <source>Add to</source>\n        <translation>添加到</translation>\n    </message>\n    <message>\n        <location filename=\"../../components/album_card/album_card_base.py\" line=\"43\"/>\n        <source>Play</source>\n        <translation>播放</translation>\n    </message>\n</context>\n```\n\n可以看到上述代码描述了源文的位置和内容以及译文，但是只对父类 `AlbumCardBase` 起作用。要想对子类应用上述规则，只需复制粘贴再修改 `<name>` 标签中的类名即可，比如 `AlbumCard` 为子类，那么只需添加下述代码：\n\n```xml\n<context>\n    <name>AlbumCard</name>\n    <message>\n        <location filename=\"../../components/album_card/album_card_base.py\" line=\"50\"/>\n        <source>Add to</source>\n        <translation>添加到</translation>\n    </message>\n    <message>\n        <location filename=\"../../components/album_card/album_card_base.py\" line=\"43\"/>\n        <source>Play</source>\n        <translation>播放</translation>\n    </message>\n</context>\n```\n\n完成上述步骤后导出 qm 文件即可。\n",
  createTime: "2022-03-14 00:27:57",
  id: "1",
  summary: "前言\n有些时候我们在父类中使用了 self.tr('XXX')，使用 Qt Linguist 完成翻译并导出 qm 文件后，发现子类中仍然是英文原文。比如下面这段代码：\nclass AlbumCardBase(QWidget):\n    &quot;&quot;&quot; 专辑卡基类 &quot;",
  tags: [
    {
      id: "2",
      name: "python"
    },
    {
      id: "8",
      name: "pyqt"
    }
  ],
  thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a935e01ef.webp",
  title: "如何在 pyqt 中解决国际化 tr() 函数不管用的问题",
  viewCount: "5"
};

// 标签列表数据
export const mockTagList = [
  {
    count: 1,
    id: "1",
    name: "markdown"
  },
  {
    count: 3,
    id: "2",
    name: "python"
  },
  {
    count: 1,
    id: "3",
    name: "装饰器"
  },
  {
    count: 1,
    id: "4",
    name: "计算属性"
  },
  {
    count: 1,
    id: "5",
    name: "IDEA"
  },
  {
    count: 1,
    id: "6",
    name: "vue"
  },
  {
    count: 2,
    id: "7",
    name: "前端"
  },
  {
    count: 1,
    id: "8",
    name: "pyqt"
  },
  {
    count: 1,
    id: "9",
    name: "deep-learning"
  },
  {
    count: 1,
    id: "10",
    name: "SSD"
  },
  // 新增标签
  {
    count: 1,
    id: "11",
    name: "javascript"
  },
  {
    count: 1,
    id: "12",
    name: "css"
  },
  {
    count: 1,
    id: "13",
    name: "react"
  },
  {
    count: 1,
    id: "14",
    name: "nodejs"
  },
  {
    count: 1,
    id: "15",
    name: "数据库"
  },
  {
    count: 1,
    id: "16",
    name: "docker"
  },
  {
    count: 1,
    id: "17",
    name: "响应式"
  },
  {
    count: 1,
    id: "18",
    name: "异步编程"
  },
  {
    count: 1,
    id: "19",
    name: "Webpack"
  },
  {
    count: 1,
    id: "20",
    name: "Hooks"
  }
];

// 归档列表数据
export const mockArchiveList = {
  rows: [
    {
      articles: [
        {
          createTime: "2022-05-30 12:40:16",
          id: "16",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9219f755.webp",
          title: "Docker 容器化部署最佳实践",
          viewCount: "167"
        },
        {
          createTime: "2022-05-25 17:55:21",
          id: "15",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9318165b.webp",
          title: "MongoDB 高级查询与索引优化",
          viewCount: "98"
        },
        {
          createTime: "2022-05-20 08:18:37",
          id: "14",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9134fd76.webp",
          title: "Node.js 性能优化实战",
          viewCount: "142"
        },
        {
          createTime: "2022-05-15 15:22:40",
          id: "13",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a94412622.webp",
          title: "React Hooks 深入浅出",
          viewCount: "189"
        },
        {
          createTime: "2022-05-10 10:30:55",
          id: "12",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a918e4d74.webp",
          title: "CSS Grid 与 Flexbox 布局完全指南",
          viewCount: "156"
        },
        {
          createTime: "2022-05-05 13:45:12",
          id: "11",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9d841c35.webp",
          title: "JavaScript 异步编程演进史",
          viewCount: "203"
        },
        {
          createTime: "2022-05-01 11:20:33",
          id: "10",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9cb173a8.webp",
          title: "Webpack 5 核心原理与优化策略",
          viewCount: "176"
        },
        {
          createTime: "2022-04-22 16:42:18",
          id: "9",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a92aa6e5d.webp",
          title: "Vue 3 响应式系统原理解析",
          viewCount: "215"
        },
        {
          createTime: "2022-04-18 09:15:45",
          id: "8",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a912447cf.webp",
          title: "Python 装饰器完全指南",
          viewCount: "96"
        },
        {
          createTime: "2022-04-15 14:30:22",
          id: "7",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a935e01ef.webp",
          title: "深入理解 Vue 3 Composition API",
          viewCount: "128"
        },
        {
          createTime: "2022-03-14 00:27:57",
          id: "1",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9318165b.webp",
          title: "如何在 pyqt 中解决国际化 tr() 函数不管用的问题",
          viewCount: "6"
        },
        {
          createTime: "2022-03-13 23:59:15",
          id: "2",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9134fd76.webp",
          title: "如何在 Vue3 中处理 img 标签图片加载错误的问题",
          viewCount: "6"
        },
        {
          createTime: "2022-02-12 22:32:45",
          id: "3",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a94412622.webp",
          title: "对 python 中 @property 装饰器的一点思考",
          viewCount: "34"
        },
        {
          createTime: "2022-01-12 21:16:07",
          id: "4",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9219f755.webp",
          title: "测试 Kila Kila Blog 的博客样式",
          viewCount: "73"
        }
      ],
      year: 2022
    },
    {
      articles: [
        {
          createTime: "2021-12-13 13:24:53",
          id: "5",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a918e4d74.webp",
          title: "如何在 IDEA 中配置 Easy Code 的 MybatisPlus 实体类模板",
          viewCount: "8"
        },
        {
          createTime: "2021-11-09 00:30:14",
          id: "6",
          thumbnail: "https://tc.alcy.cc/i/2025/07/29/6887a9cb173a8.webp",
          title: "如何处理 SSD 神经网络在小目标检测数据集上 mAP 和置信度较低的问题",
          viewCount: "2"
        }
      ],
      year: 2021
    }
  ],
  total: "16"
};

// 评论列表数据
export const mockCommentList = {
  rows: [
    {
      articleId: "1",
      content: "非常有用的文章，解决了我很久的问题",
      createTime: "2022-03-15 10:30:22",
      id: "1",
      nickName: "张三",
      parentId: null,
      replyNickName: null,
      avatar: "https://tc.alcy.cc/i/2025/07/29/6887a9124a1f6.webp"
    },
    {
      articleId: "1",
      content: "感谢分享，学到了很多",
      createTime: "2022-03-16 14:22:15",
      id: "2",
      nickName: "李四",
      parentId: null,
      replyNickName: null,
      avatar: "https://tc.alcy.cc/i/2025/07/29/6887a9d841c35.webp"
    },
    {
      articleId: "1",
      content: "我也遇到过类似问题，你的解决方案很实用",
      createTime: "2022-03-16 18:45:30",
      id: "3",
      nickName: "王五",
      parentId: "2",
      replyNickName: "李四",
      avatar: "https://tc.alcy.cc/i/2025/07/29/6887a9e32634b.webp"
    }
  ],
  total: "3"
};

// 分类列表数据
export const mockCategoryList = [
  {
    count: 1,
    id: "1",
    name: "markdown"
  },
  {
    count: 3,
    id: "2",
    name: "python"
  },
  {
    count: 1,
    id: "3",
    name: "vue"
  },
  {
    count: 1,
    id: "4",
    name: "deep-learning"
  },
  {
    count: 1,
    id: "5",
    name: "java"
  },
  // 新增分类
  {
    count: 2,
    id: "6",
    name: "前端"
  },
  {
    count: 1,
    id: "7",
    name: "javascript"
  },
  {
    count: 1,
    id: "8",
    name: "css"
  },
  {
    count: 1,
    id: "9",
    name: "react"
  },
  {
    count: 1,
    id: "10",
    name: "nodejs"
  },
  {
    count: 1,
    id: "11",
    name: "数据库"
  },
  {
    count: 1,
    id: "12",
    name: "docker"
  }
];